<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/commom.css"/>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css"/>
	</head>
	<body>
		
		<div class="container-fluid right-iframe-wrapper">
			<div class="row">
				<div class="right-title">
					<h1 class="font-18">成员管理<small class="font-16">&nbsp;&nbsp;-&nbsp;&nbsp;成员管理</small></h1>
				</div>
				<div class="clearfix"></div>
				<div class="row">
					<!--<span class="pull-left">
						<a class="btn btn-warning" href="addCourseManage.html">增加课程</a>
						<a class="btn btn-danger" name="delete">删除课程</a>
						<a class="btn btn-info" href="#">修改课程</a>
						<a class="btn btn-s" href="#">生成课表</a>
					</span>-->
					<div class="right-search col-md-4 col-xs-6 pull-right no-pd-right">
						
						<div class="input-group">
							<input type="text" class="form-control" placeholder="输入关键字搜索" id="a">
							<span class="input-group-btn">
						        <button class="btn btn-warning" type="button" id="seach">搜索</button>
						    </span>
						</div>
					</div>
				</div>
				
				<!--表格-->
				<div class="right-table">
					<table class="table table-bordered table-hover text-center">
						<thead>
							<tr>
								<th>序号</th>
							    <th>名字</th>
								<th>性别</th>
								<th>年级/班级</th>
								
								<th>联系方式</th>
								<th>职位</th>
								<th>操作</th>
								<!--<th>星期四</th>
								<th>星期五</th>
								<th>星期六</th>
								<th>星期日</th>-->
							</tr>
						</thead>
						<tbody name="cx">
						<c:forEach items="${memberlist }" var="list">
							<tr>
								<!--<td>
							    <input type="radio" value="None" name="c"/>
								</td>-->
								<td>${list.mid }</td>
								<td>${list.name }</td>
								<td>${list.sex }</td>
								<td>${list.classs }</td>
								
								<td>${list.phone }</td>
								<td>${list.position }</td>
								<td><!-- <a style="cursor: pointer;">编辑</a>| --><a style="cursor: pointer;" href="deletemember.do?mid=${list.mid }">删除</a></td>
								<!--<td>9</td>
								<td>10</td>
								<td>10</td>-->

							</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
				<!--分页-->
				<!--<div class="page">
					<!--首页--><!--<a href="#">|&lt;</a>-->
					<!--上一页--><!--<a href="#">&lt;</a>-->
					<!--<span class="pager">
						<a class="current" href="#">1</a>
						<a href="#">2</a>
						<a href="#">3</a>
						<a href="#">4</a>
					</span>-->
					<!--下一页--><!--<a href="#">&gt;</a>-->
					<!--末页--><!--<a href="#">&gt;|</a>
				</div>-->
				<!--分页 end-->
			</div>
		</div>
		
		
		
		<script src="${pageContext.request.contextPath}/js/bootstrap.min.js" type="text/javascript"></script>
		<script src="${pageContext.request.contextPath}/js/jquery-2.1.3.min.js" type="text/javascript"></script>
		<script type="text/javascript">
		$(function(){
			//下拉列表赋值
			$("#seach").click(function(){
				$.post("seachmember.do",{seach:$("#a").val()},function(result){
					if(result!=""){
						$("tbody[name='cx']").empty();
						for(var i=0;i<result.length;i++){
							
								$("tbody[name='cx']").append("<tr><td>"+result[i].mid+"</td>"
										+"<td>"+result[i].name+"</td><td>"+result[i].sex+"</td>"
										+"<td>"+result[i].classs+"</td><td>"+result[i].phone+"</td><td>"+result[i].position+"</td>"+"<td><a style='cursor: pointer;'>编辑</a>|<a style='cursor: pointer;' href='deletemember.do?mid="+result[i].mid+"'>删除</a></td></tr>");
							}	
						}
					else{
						alert("没有此新闻！")
					}
				});
			});
		})
			
		</script>
	</body>
</html>
